package com.usian.feign;

import com.usian.model.dtos.XiansuoDto;
import com.usian.model.pojos.Provinces;
import com.usian.model.pojos.Result;
import com.usian.model.pojos.Source;
import com.usian.model.pojos.Xiansuo;
import com.usian.utils.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "provider")
public interface ProviderFeign {

    @PostMapping("/api/v1/xiansuo/list")
    public ResponseResult list(@RequestBody XiansuoDto dto);

    @GetMapping("/api/v1/xiansuo/pro")
    public List<Provinces> proList(@RequestParam Integer parentId, @RequestParam Integer rank);

    @PostMapping("/source/list")
    public List<Source> list();

    @PostMapping("/api/v1/xiansuo/save")
    public ResponseResult save(@RequestBody Xiansuo xiansuo);

    @GetMapping("/api/v1/xiansuo/deleteById")
    public ResponseResult deleteById(@RequestParam Integer id);

    @PostMapping("/api/v1/xiansuo/shenhe")
    public ResponseResult shenhe(@RequestBody Xiansuo xiansuo);

    @PostMapping("/api/v1/result/list")
    public List<Result> resultList();
}
